package com.meituan.sdk.model.rhone.mtp.orderRescheduleNotice;

import com.meituan.sdk.annotations.ApiMeta;
import com.google.gson.reflect.TypeToken;
import javax.validation.constraints.NotBlank;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 订单改签通知
* This file was automatically generated.
*/
@ApiMeta(
    path = "/rhone/mtp/api/order/reschedule/notice",
    businessId = 66,
    apiVersion = "10012",
    apiName = "order_reschedule_notice",
    needAuth = false
)
public class OrderRescheduleNoticeRequest implements MeituanRequest<String> {
    /**
    * <p data-diff-id="ct-diff-id-98bde25f-ba9e-4d03-9460-dfd9c1bbbf8f"><span style="color: ">合作方ID</span></p>
    */
    @NotNull(message = "partnerId不能为空")
    @SerializedName("partnerId")
    private Integer partnerId;
    /**
    * <p data-diff-id="ct-diff-id-5bc4b930-b1a5-4de2-a464-70ed5cd6b00e"><span style="color: ">交互码，必须回传；200为改签成功，300为改签失败，不能有其它交互码，否则不能识别，按无效请求处理</span></p>
    */
    @NotNull(message = "code不能为空")
    @SerializedName("code")
    private Integer code;
    /**
    * <p data-diff-id="ct-diff-id-d2c359a1-aca6-41c8-83cf-0543f93eeaee"><span style="color: ">交互描述，如错误信息等。失败时要返回真实的失败原因，不能用“其他”代替，必须回传</span></p>
    */
    @NotBlank(message = "describe不能为空")
    @SerializedName("describe")
    private String describe;
    /**
    * <p data-diff-id="ct-diff-id-6a0d8951-bd9e-430e-8381-6d9599dd2e59"><span style="color: ">改签通知请求内容</span></p>
    */
    @NotNull(message = "body不能为空")
    @SerializedName("body")
    private Body body;

    public Integer getPartnerId() {
        return partnerId;
    }
    public void setPartnerId(Integer partnerId) {
        this.partnerId = partnerId;
    }
    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }
    public String getDescribe() {
        return describe;
    }
    public void setDescribe(String describe) {
        this.describe = describe;
    }
    public Body getBody() {
        return body;
    }
    public void setBody(Body body) {
        this.body = body;
    }


    @Override
    public MeituanResponse<String> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<String>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "OrderRescheduleNoticeRequest{" + "partnerId=" + partnerId + "," + "code=" + code + "," + "describe=" + describe + "," + "body=" + body + "}";
    }
}
